Method: ActiveRecord::Core#<=>

Defined in:
lib/active_record/core.rb

#<=>(other_object) ⇒ Object

Allows sort on objects



473
474
475
476
477
478
479
# File 'lib/active_record/core.rb', line 473

def <=>(other_object)
  if other_object.is_a?(self.class)
    to_key <=> other_object.to_key
  else
    super
  end
end